package com.blb.day20231107login.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.blb.day20231107login.entity.Permission;
import com.blb.day20231107login.entity.User;
import org.springframework.security.core.GrantedAuthority;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenheng
 * @since 2023-11-06
 */
public interface IUserService extends IService<User> {

    /**
     * 根据用户名查询授权集合
     * @param username
     * @return
     */
    List<GrantedAuthority> getAuthoritiesByUsername(String username);

    /**
     * 按用户名查询权限和子权限
     */
    List<Permission> getPermissionsWithChildrenByUsername(String username);
}
